A rootkit is malicious software used to install and hide other malicious programs inside a computer system. Rootkits are programmed so that is very difficult to detect the rootkits through standard anti-virus or anti-spyware scans on the operating system. A rootkit can be categorized as one of the following five types depending upon the location in the computer system in which the rootkit executes: (1) firmware, (2) hypervisor, (3) kernel, (4), library, and (5) application. As one example, a kernel-level rootkit adds additional code or replaces portions of an operating system, including both the kernel and associated device drivers. Most operating systems support kernel-mode device drivers that execute with the same privileges as the operating system itself. As such, many kernel-level rootkits are developed as device drivers or loadable kernel modules. Code added or replaced by a kernel-level rootkit may have serious impacts on the stability of the entire computer system if bugs are present in the code. Because kernel-level rootkits operate at the same security level as the operating system itself, they are able to intercept or subvert operations performed by the operating system, including operations of anti-virus software running on the compromised system. Known techniques for detecting and preventing rootkits degrade system performance and have limited detection and prevention capabilities because they operate only at later stages of the booting of the operating system. Furthermore, because known kernel-level rootkit detection and prevention tools are provided by third parties and reside outside the operating system, a customer who is purchasing an operating system and wants detection and prevention of rootkits is subject to the separate costs of the operating system's purchase price and a licensing fee for the third party's rootkit detection and prevention tool. Thus, there exists a need to overcome at least one of the preceding deficiencies and limitations of the related art.